import {defHttp} from '/@/utils/http/axios';

enum Api {
  list = "/pay-service/mch/payPassage/list",
  update = "/pay-service/mch/payPassage/saveOrUpdate",
  get = "/pay-service/mch/payPassage/get",
  delete = "/pay-service/mch/payPassage/delete",
}


/**
 * 查询列表
 * @param params
 */
export const listPayPassage = (params) => {
  return defHttp.get({url: Api.list, params});
}

/**
 * 获取相信信息
 * @param params
 */
export const getPayPassage = (params) => {
  return defHttp.get({url: Api.get, params});
}

/**
 * 删除
 * @param params
 */
export const deletePayPassage = (params, handleSuccess) => {
  return defHttp.delete({url: Api.delete, data: params}, {joinParamsToUrl: true}).then(() => {
    handleSuccess();
  });
}

/**
 * 保存或者更新
 * @param params
 */
export const saveOrUpdatePayPassage = (params, isUpdate) => {
  return defHttp.post({url: Api.update, params});
}


